package TwentyOne.Class.Define;

class  User {

    private String uid;
    private String password;
    private static int count = 0;
    public User(){
        this("NOID","mldn");
    }
    public User(String uid){
        this(uid,"mldnjava");
    }
    public User(String uid,String password){
        this.uid=uid;
        this.password=password;
        count++;
    }
    public static int getCount(){
        return count;
    }
    public String getInfo(){
        return "用户名：" + this.uid + "、密码：" + this.password ;
    }

    public void setUid(String uid){
        this.uid=uid;
    }
    public void setPassword(String password){
        this.password=password;
    }
    public String getUid(){
        return this.uid;
    }
    public String getPassword(){
        return this.password;
    }
}

public class a6_User {
    public static void main(String[] args) {
        User userA=new User();
        User userB=new User("大强");
        User userC=new User("小强","哈哈哈");
        System.out.println(userA.getInfo());
        System.out.println(userB.getInfo());
        System.out.println(userC.getInfo());
        System.out.println("用户的个数："+User.getCount());
    }
}
